//
//  ReviewOfTheOrderTableViewCellFrame.m
//  OrderAssistant
//
//  Created by chendong on 2020/10/28.
//  Copyright © 2020 chendong. All rights reserved.
//

#import "ReviewOfTheOrderTableViewCellFrame.h"

@implementation ReviewOfTheOrderTableViewCellFrame
-(void)setDic:(NSDictionary *)dic{
    _dic = dic;
    
    NSString *s = [NSString stringWithFormat:@"%@",self.dic[@"OrderBZ"]];
    NSMutableParagraphStyle*paragraphStyle = [[NSMutableParagraphStyle alloc]init];

    paragraphStyle.lineSpacing=0;//字体的行间距

    NSDictionary*attributes =@{

    NSFontAttributeName:[UIFont systemFontOfSize:14],

    NSParagraphStyleAttributeName:paragraphStyle,
    
    NSForegroundColorAttributeName:[UIColor blackColor]
    
    };
    
    NSMutableAttributedString *attributeText = [[NSMutableAttributedString alloc]initWithString:s attributes:attributes];

//    detailTextView.attributedText=attributeText;

//    CGSizedeSize = [detailTextView sizeThatFits:CGSizeMake(width,MAXFLOAT)];

    CGFloat h = [s boundingRectWithSize:CGSizeMake(SCREENWIDTH-85, MAXFLOAT) options:NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:nil].size.height;
//    CGFloat h = [s sizeWithFont:[UIFont systemFontOfSize:14] constrainedToSize:CGSizeMake(SCREENWIDTH-85, MAXFLOAT)].height;
//    self.remarkH = h<25?25:h;
    self.remarkH = h;
    self.bgVH = 125+(h-25);
    self.cellH = 135+(h-25);
}
@end
